<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMenusTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('menus', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name')->comment('菜单名称');
            $table->string('url')->nullable()->comment('跳转链接');
            $table->string('icon')->comment('菜单图标')->nullable();
            $table->string('hightlight_url')->nullable()->comment('高亮地址');
            $table->unsignedTinyInteger('sort')->dafault(0)->nullable()->comment('排序');
            $table->unsignedInteger('parent_id')->default(0)->comment('父级id');
            $table->boolean('is_system')->default(0)->comment('系统菜单');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('menus');
    }
}
